﻿using System;
using System.Windows.Forms;

public partial class FormLog : Form
{
    public FormLog()
    {
        InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {
        if (this.textBox1.Text == "123321")
        {
            this.DialogResult = DialogResult.OK;
        }
    }

    private void textBox1_KeyDown(object sender, KeyEventArgs e)
    {
        if (e.KeyData == Keys.Enter)
        {
            if (this.textBox1.Text == "123321")
            {
                this.DialogResult = DialogResult.OK;
            }
        }
    }

    private void FormLog_Load(object sender, EventArgs e)
    {
    }
}